  /**
   * Generate time : 2012-10-23 6:14:15
   * Version : 1.0.1.V20070717
   */
package com.baosight.sczx.zp.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;
/**
 * ZPResourcesetMember 
 *  
 */
public class ZPResourcesetMember extends DaoEPBase {

	private String setName = " ";		
	private String memberName = " ";		
	private String memberType = " ";		

	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		
	eiColumn = new EiColumn("setName");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("memberName");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(256);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("memberType");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(8);	
	eiColumn.setDescName(" ");
	eiMetadata.addMeta(eiColumn);
	

	}
	/**
	 * the constructor
	 */
	public ZPResourcesetMember() {
		initMetaData();
	}
	
	/**
	 * get the setName 
	 * @return the setName
	 */
	public String getSetName() {
		return this.setName;
	}
	
	/**
	 * set the setName 
	 */
	public void setSetName(String setName) {
		this.setName = setName;
	}
	
	/**
	 * get the memberName 
	 * @return the memberName
	 */
	public String getMemberName() {
		return this.memberName;
	}
	
	/**
	 * set the memberName 
	 */
	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}
	
	/**
	 * get the memberType 
	 * @return the memberType
	 */
	public String getMemberType() {
		return this.memberType;
	}
	
	/**
	 * set the memberType 
	 */
	public void setMemberType(String memberType) {
		this.memberType = memberType;
	}
	
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setSetName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("setName")), setName));
		setMemberName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("memberName")), memberName));
		setMemberType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("memberType")), memberType));
	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("setName",StringUtils.toString(setName, eiMetadata.getMeta("setName")));	
			map.put("memberName",StringUtils.toString(memberName, eiMetadata.getMeta("memberName")));	
			map.put("memberType",StringUtils.toString(memberType, eiMetadata.getMeta("memberType")));	
			
		return map;
	
	}
}